<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>测评列表</title>
    <link rel="stylesheet" href="{{asset('/default/css/public.css')}}">
    <link rel="stylesheet" href="{{asset('/default/css/personal/apmActivityList.css')}}">
    <link rel="stylesheet" href="{{asset('/default/css/index/index_head_foot.css')}}">
    {{--添加样式表--}}
    @yield('insert_css')
</head>
<body>
{{--头部顶端--}}
@include('default.layouts.head')
{{--导航--}}
<div class="mainNav">
    <div class="wrapper">
        {{--网站logo--}}
        <h1 class="logo">
            <a href="{{url('/')}}">
                <img src="{{asset('default/images/logo/index.png')}}">
            </a>
        </h1>
        {{--导航内容--}}
        @if(!empty($menuNav))
            <ul>
                <li><a href="{{url('/')}}">首页</a></li>
                @foreach($menuNav as $v)
                    @if($v->nav_url == 'personnel')
                        <li><a href="{{url($v->nav_url.'?havedetails=9')}}">{{$v->nav_name}}</a></li>
                    @else
                        <li><a href="{{url($v->nav_url)}}">{{$v->nav_name}}</a></li>
                    @endif
                @endforeach
            </ul>
        @endif
    </div>
</div>

@section('content')
{{--主题内容--}}
<div class="main">
    <div class="wrapper">
        <div class="banner">
            <img src="{{asset('/default/images/personal/cp_banner.png')}}" alt="测评banner图" width="1000" height="240">
        </div>
        <div class="content">
            <ul>
                @foreach($activityList as $key => $value)
                    <li>
                        <div class="left">
                            <i></i><span class="title">{{$value}}</span>
                        </div>
                        <div class="right">
                            <a href="{{route('apmTestUrl',['activityId'=>$key,'resumeId'=>$resumeId])}}" data="{{in_array($key,$doneArr)?0:1}}" target="_blank">{{in_array($key,$doneArr)?'查看结果':'开始测试'}}</a>
                            <span class="result">{{$activityNum[$key] or 200}}人测试过</span>
                        </div>
                    </li>
                @endforeach
            </ul>
        </div>
    </div>
</div>
@show
<div class="confirmLayer">

</div>
{{--尾部内容--}}
<div class="bottomnav">
    <div class="center">
        <div class="con">
            @include('default.layouts.simple_footer')
        </div>
    </div>
</div>
@section('js')
    <script type="text/javascript" src="{{asset('/default/js/jquery.js')}}"></script>
    <script type="text/javascript" src="{{asset('/vendor/org/layer/layer.js')}}"></script>
    <script type="text/javascript" src="{{asset('/orange/js/public.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/head.js')}}"></script>
    <script type="text/javascript">
        $(function(){
            $('.main .content .right a').click(function(){
                var _that = $(this);
                //如果是评测才弹窗，查看结果不弹窗
                if(_that.attr('data') == 1){
                    layer.open({
                        type: 1,
                        title: '请在新开页面完成测试后选择',
                        skin: 'layui-layer-demo', //不要边框
                        closeBtn: 0, //不显示关闭按钮
                        shadeClose: false, //关闭遮罩关闭
                        area: ['360px', '140px'], //宽高
                        content: '<a class="left" href="'+_that.attr('href')+'" target="_blank">已完成测试</a><a class="right" href="">返回列表</a>'
                    });
                };
            });
        });
    </script>
@show